#ifndef ALIEN_ATTACK_SCROLLINGBACKGROUND_H
#define ALIEN_ATTACK_SCROLLINGBACKGROUND_H
#include "GameObjectFactory.h"
#include "ShooterObject.h"
#include <iostream>

struct ScrollingBackground : public ShooterObject
{
    virtual ~ScrollingBackground() {}
    ScrollingBackground();

    virtual void draw();
    virtual void update();
    virtual void clean();
    virtual void load(std::unique_ptr<LoaderParams> const &pParams);

private:
    int m_scrollSpeed;

    int count;
    int maxcount;

    SDL_Rect m_srcRect1;
    SDL_Rect m_srcRect2;

    SDL_Rect m_destRect1;
    SDL_Rect m_destRect2;

    int m_srcRect1Width;
    int m_srcRect2Width;

    int m_destRect1Width;
    int m_destRect2Width;
};

struct ScrollingBackgroundCreator : public BaseCreator
{
    virtual GameObject *createGameObject() const
    {
        return new ScrollingBackground();
    }
};

#endif // header file protect